package com.baizhi.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
import java.util.List;

//用户表
public class User {
    private Integer userId;
    private String userTelphone;
    private String userPassword;
    //用户头像
    private String userImage;
    //用户昵称
    private String userNickname;
    //登录用户名
    private String userName;

    private String userSex;
   //个性签名
    private String userAutograph;
    //用户省份
    private String userProvince;
    //用户城市
    private String userCity;
    //用户关注的上师id
    private Integer  guruId;
    //用户的当前状态   未激活/激活/正常/冻结
    private Integer userStatus;
    //用户注册日期
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date userCreateDate;
    //多对多的对应关系  一个用户可以对应多个上师 一个上师也可以对应多个用户
    //多对一
    private Guru guru;
    //一对多
    private List<Guru> guruList;


    public User() {
    }

    public User(Integer userId, String userTelphone, String userPassword, String userImage, String userNickname, String userName, String userSex, String userAutograph, String userProvince, String userCity, Integer guruId, Integer userStatus, Date userCreateDate, Guru guru, List<Guru> guruList) {
        this.userId = userId;
        this.userTelphone = userTelphone;
        this.userPassword = userPassword;
        this.userImage = userImage;
        this.userNickname = userNickname;
        this.userName = userName;
        this.userSex = userSex;
        this.userAutograph = userAutograph;
        this.userProvince = userProvince;
        this.userCity = userCity;
        this.guruId = guruId;
        this.userStatus = userStatus;
        this.userCreateDate = userCreateDate;
        this.guru = guru;
        this.guruList = guruList;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserTelphone() {
        return userTelphone;
    }

    public void setUserTelphone(String userTelphone) {
        this.userTelphone = userTelphone;
    }

    public String getUserPassword() {
        return userPassword;
    }

    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword;
    }

    public String getUserImage() {
        return userImage;
    }

    public void setUserImage(String userImage) {
        this.userImage = userImage;
    }

    public String getUserNickname() {
        return userNickname;
    }

    public void setUserNickname(String userNickname) {
        this.userNickname = userNickname;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserSex() {
        return userSex;
    }

    public void setUserSex(String userSex) {
        this.userSex = userSex;
    }

    public String getUserAutograph() {
        return userAutograph;
    }

    public void setUserAutograph(String userAutograph) {
        this.userAutograph = userAutograph;
    }

    public String getUserProvince() {
        return userProvince;
    }

    public void setUserProvince(String userProvince) {
        this.userProvince = userProvince;
    }

    public String getUserCity() {
        return userCity;
    }

    public void setUserCity(String userCity) {
        this.userCity = userCity;
    }

    public Integer getGuruId() {
        return guruId;
    }

    public void setGuruId(Integer guruId) {
        this.guruId = guruId;
    }

    public Integer getUserStatus() {
        return userStatus;
    }

    public void setUserStatus(Integer userStatus) {
        this.userStatus = userStatus;
    }

    public Date getUserCreateDate() {
        return userCreateDate;
    }

    public void setUserCreateDate(Date userCreateDate) {
        this.userCreateDate = userCreateDate;
    }

    public Guru getGuru() {
        return guru;
    }

    public void setGuru(Guru guru) {
        this.guru = guru;
    }

    public List<Guru> getGuruList() {
        return guruList;
    }

    public void setGuruList(List<Guru> guruList) {
        this.guruList = guruList;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", userTelphone='" + userTelphone + '\'' +
                ", userPassword='" + userPassword + '\'' +
                ", userImage='" + userImage + '\'' +
                ", userNickname='" + userNickname + '\'' +
                ", userName='" + userName + '\'' +
                ", userSex='" + userSex + '\'' +
                ", userAutograph='" + userAutograph + '\'' +
                ", userProvince='" + userProvince + '\'' +
                ", userCity='" + userCity + '\'' +
                ", guruId=" + guruId +
                ", userStatus=" + userStatus +
                ", userCreateDate=" + userCreateDate +
                ", guru=" + guru +
                ", guruList=" + guruList +
                '}';
    }
}
